package com.app.ytong.bean;

import android.text.TextUtils;

import com.alibaba.fastjson.annotation.JSONField;

import my.MathUtils;

public class RecordListData extends BasisBean {



//    {
//        "iid": "1536896994687389697",
//            "idt": "2022-06-15 10:22:52.0",
//            "mid": "2022061500001",
//            "aid": "2",
//            "cna": "供应商-代理商",
//            "gid": "1512231875063939073",
//            "gno": "10142213",
//            "gna": "茶青0011",
//            "gsp": "500g/箱",
//            "gun": "饼",
//            "gwt": "22.40",
//            "pri": "11.00",
//            "rfid": null,
//            "gnu": "1.00",
//            "icost": "246.40",
//            "fsg": "11",
//            "rem": null,
//            "uno": "2001",
//            "jno": "2001",
//            "tid": "1485870325336141825",
//            "tna": "贡眉",
//            "lid": "1492418536444063746",
//            "lna": "特级",
//            "wno": "582ffc1f1d7d8be",
//            "pid": "",
//            "sty": "1",
//            "acc": "1",
//            "pwt": null,
//            "cid": "1498934216127467522",
//            "cdno": "8989",
//            "wna": null
//    }

    private static final long serialVersionUID = 1L;


    @JSONField(name = "iid")
    private String iid;
    @JSONField(name = "idt")
    private String idt;
    @JSONField(name = "mid")
    private String mid;
    @JSONField(name = "aid")
    private String aid;
    @JSONField(name = "cna")
    private String cna;
    @JSONField(name = "gno")
    private String gno;
    @JSONField(name = "gna")
    private String gna;
    @JSONField(name = "gsp")
    private String gsp;
    @JSONField(name = "gun")
    private String gun;
    @JSONField(name = "gwt")
    private String gwt;
    @JSONField(name = "pri")
    private String pri;
    @JSONField(name = "rfid")
    private String rfid;
    @JSONField(name = "gnu")
    private String gnu;
    @JSONField(name = "icost")
    private String icost;
    @JSONField(name = "fsg")
    private String fsg;
    @JSONField(name = "rem")
    private String rem;
    @JSONField(name = "uno")
    private String uno;
    @JSONField(name = "tid")
    private String tid;
    @JSONField(name = "tna")
    private String tna;
    @JSONField(name = "lid")
    private String lid;
    @JSONField(name = "lna")
    private String lna;
    @JSONField(name = "wno")
    private String wno;
    @JSONField(name = "bno")
    private String bno;
    @JSONField(name = "gid")
    private String gid;
    @JSONField(name = "rem")
    private String remX;
    @JSONField(name = "jno")
    private String jno;
    @JSONField(name = "pid")
    private String pid;
    @JSONField(name = "sty")
    private String sty;
    @JSONField(name = "acc")
    private String acc;
    @JSONField(name = "pwt")
    private String pwt;
    @JSONField(name = "cid")
    private String cid;
    @JSONField(name = "cdno")
    private String cdno;
    @JSONField(name = "wna")
    private String wna;
    @JSONField(name = "ifs")
    private String ifs;
    @JSONField(name = "cno")
    private String cno;
    @JSONField(name = "total")
    private String total;


    public String getIid() {
        return iid;
    }

    public void setIid(String iid) {
        this.iid = iid;
    }

    public String getIdt() {
        return idt;
    }

    public void setIdt(String idt) {
        this.idt = idt;
    }

    public String getMid() {
        return mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    public String getCna() {
        return cna;
    }

    public void setCna(String cna) {
        this.cna = cna;
    }

    public String getGno() {
        return gno;
    }

    public void setGno(String gno) {
        this.gno = gno;
    }

    public String getGna() {
        return gna;
    }

    public void setGna(String gna) {
        this.gna = gna;
    }

    public String getGsp() {
        return gsp;
    }

    public void setGsp(String gsp) {
        this.gsp = gsp;
    }

    public String getGun() {
        return gun;
    }

    public void setGun(String gun) {
        this.gun = gun;
    }

    public String getGwt() {
        return gwt;
    }

    public void setGwt(String gwt) {
        this.gwt = gwt;
    }

    public String getPri() {
        return pri;
    }

    public void setPri(String pri) {
        this.pri = pri;
    }

    public String getRfid() {
        return rfid;
    }

    public void setRfid(String rfid) {
        this.rfid = rfid;
    }

    public String getGnu() {
        return gnu;
    }

    public void setGnu(String gnu) {
        this.gnu = gnu;
    }

    public String getIcost() {
        return icost;
    }

    public void setIcost(String icost) {
        this.icost = icost;
    }

    public String getFsg() {
        return fsg;
    }

    public void setFsg(String fsg) {
        this.fsg = fsg;
    }

    public String getRem() {
        return rem;
    }

    public void setRem(String rem) {
        this.rem = rem;
    }

    public String getUno() {
        return uno;
    }

    public void setUno(String uno) {
        this.uno = uno;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public String getTna() {
        return tna;
    }

    public void setTna(String tna) {
        this.tna = tna;
    }

    public String getLid() {
        return lid;
    }

    public void setLid(String lid) {
        this.lid = lid;
    }

    public String getLna() {
        return lna;
    }

    public void setLna(String lna) {
        this.lna = lna;
    }

    public String getWno() {
        return wno;
    }

    public void setWno(String wno) {
        this.wno = wno;
    }

    @JSONField(serialize = false)
    public String getMoney(){
        return MathUtils.multiply(pri,gwt);
    }

    public String getBno() {
        return bno;
    }

    public void setBno(String bno) {
        this.bno = bno;
    }

    public String getAutoBno(){
        if(TextUtils.isEmpty(getBno()) || "null".equals(getBno())) return null;
        return "http://www.fdbcdsj.cn:8880/QRHome/Scan/"+getBno();
    }


    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }


    public String getRemX() {
        return remX;
    }

    public void setRemX(String remX) {
        this.remX = remX;
    }

    public String getJno() {
        return jno;
    }

    public void setJno(String jno) {
        this.jno = jno;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getSty() {
        return sty;
    }

    public void setSty(String sty) {
        this.sty = sty;
    }

    public String getAcc() {
        if(TextUtils.isEmpty(acc)) return "0";
        return acc;
    }

    public void setAcc(String acc) {
        this.acc = acc;
    }

    public String getPwt() {
        if(TextUtils.isEmpty(pwt))return "0";
        return pwt;
    }

    public void setPwt(String pwt) {
        this.pwt = pwt;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getCdno() {
        return cdno;
    }

    public void setCdno(String cdno) {
        this.cdno = cdno;
    }

    public String getWna() {
        return wna;
    }

    public void setWna(String wna) {
        this.wna = wna;
    }

    public void setPwtAndNotify(String value){
        if(TextUtils.isEmpty(value) || "null".equals(value)) value ="0";
        setGwt(MathUtils.add(getGwt(),MathUtils.subtract(getPwt(),value)));
        setPwt(value);
    }

    public void setPriAndNotify(String value){
        if(TextUtils.isEmpty(value) || "null".equals(value)) value="0";
        setPri(value);
    }

    public String getIfs() {
        return ifs;
    }

    public void setIfs(String ifs) {
        this.ifs = ifs;
    }


    public String getCno() {
        if(TextUtils.isEmpty(cno)) return "";
        return cno;
    }

    public void setCno(String cno) {
        this.cno = cno;
    }

    public String getTotal() {
        return total;
    }

    public void setTotal(String total) {
        this.total = total;
    }
}
